#ifndef AST_DECLARATIONS_INIT_DECLARATOR_H
#define AST_DECLARATIONS_INIT_DECLARATOR_H

#include "../ASTNode.h"

class Declarator;
class Initializer;

/*
C99   6.7
init-declarator:
		declarator
		declarator     =    initializer
*/
class InitDeclarator : public ASTNode
{
protected:
	InitDeclarator(void)
		: ASTNode(ASTNode::init_declarator){};
public:
	InitDeclarator(Declarator *pDec, Initializer *pInit = NULL)
		: ASTNode(ASTNode::init_declarator)
		, m_pDeclarator(pDec)
		, m_pInitializer(pInit){};


	virtual ~InitDeclarator(void);
	
	virtual void					codeGen();

protected:
	Declarator *						m_pDeclarator;
	Initializer *							m_pInitializer;						//may be NULL
};


#endif

